//
//  ViewController.swift
//  SimpleFactoryPatern
//
//  Created by 好米有易 on 2017/9/27.
//  Copyright © 2017年 好米有易. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    fileprivate let rectangleShap = ShapeFactory.shap(type: .rectangle)
    fileprivate let squreShap = ShapeFactory.shap(type: .squre)
    fileprivate let circleShap = ShapeFactory.shap(type: .circle)
    
  
    @IBAction func rectangleAction(_ sender: UIButton) {
        
        rectangleShap.draw()
        
    }
    
    
    @IBAction func squreAction(_ sender: UIButton) {
        
        squreShap.draw()
    }
    
    
    @IBAction func circleAction(_ sender: UIButton) {
        
        circleShap.draw()
    }
    
}

